#include<stdio.h>

enum DeviceState{
    ON,OFF,SLEEP
};

struct Device
{
    int id;
    char name[21];
    enum DeviceState devicestate;
};

int main(){
    struct Device d1={55,"wdefsc",OFF};
    struct Device d2={78,"wtys",OFF};

    d1.devicestate = ON;
    switch (d1.devicestate) {
        case ON:
            printf("%d,%s,ON\n",d1.id,d1.name);
            break;
        case OFF:
            printf("%d,%s,OFF\n",d1.id,d1.name);
            break;
        case SLEEP:
             printf("%d,%s,SLEEP\n",d1.id,d1.name);
            break;
    }
 
    d2.devicestate = ON;
    switch (d2.devicestate) {
        case ON:
            printf("%d,%s,ON\n",d2.id,d2.name);
            break;
        case OFF:
           printf("%d,%s,OFF\n",d2.id,d2.name);
            break;
        case SLEEP:
            printf("%d,%s,SLEEP\n",d2.id,d2.name);
            break;
    }

    return 0;
}
